import request from '@/utils/request'

const acceptance = {
  // 验收列表
  list(params){
    return request.get(`/kjxm/project/acceptanceList`,{params});
  },
  acceptedList(params){
    return request.get(`/kjxm/project/acceptancedList`,{params});
  },
  // 我的验收列表
  myList(params){
    return request.get(`/kjxm/project/myAcceptanceList`,{params});
  },
  myAcceptedList(params){
    return request.get(`/kjxm/project/myAcceptancedList`,{params});
  },

  add(data){
    return request.post(`/kjxm/projectAcceptanceApply/add`,data);
  },
  get(id){
    return request.get(`/kjxm/projectAcceptanceApply/detail/${id}`);
  },
  update(data){
    return request.post(`/kjxm/projectAcceptanceApply/update`,data);
  },
  getByProject(id){
    return request.get(`/kjxm/projectAcceptanceApply/getByProjectId/${id}`);
  },
  submit(data){
    return request.post('/kjxm/projectAcceptanceApply/submit', data);
  },
  oldSubmit(data){
    return request.post('/kjxm/projectAcceptanceApply/submitHistory', data);
  },
  submitYsFile(data){
    return request.post('/kjxm/projectAcceptanceApply/submitYsFile', data);
  },
  // 验收意见书列表
  opinionList(params){
    return request.get(`/kjxm/project/acceptanceIdeaList`,{params});
  },
  opinionMyList(params){
    return request.get(`/kjxm/project/myAcceptanceIdeaList`,{params});
  },
  // 编写验收意见书
  opinionAdd(data){
    return request.post(`/kjxm/projectAcceptanceIdea/add`,data);
  },
  // 修改验收意见书
  opinionUpdate(data){
    return request.post(`/kjxm/projectAcceptanceIdea/update`,data);
  },
  // 验收意见书提交
  opinionSubmit(data){
    return request.post(`/kjxm/projectAcceptanceIdea/submit`,data);
  },
  // 验收意见书提交
  opinionOldSubmit(data){
    return request.post(`/kjxm/projectAcceptanceIdea/submitHistory`,data);
  },
  // 验收意见书详情
  opinionGet(id){
    return request.get(`/kjxm/projectAcceptanceIdea/detail/${id}`);
  },
  opinionGetAll(id){
    return request.get(`/kjxm/projectAcceptanceIdea/allDetail/${id}`);
  },
  opinionGetByProjectId(id){
    return request.get(`/kjxm/projectAcceptanceIdea/getByProjectId/${id}`);
  },
  opinionCreatePDF(id){
    return request.post(`/kjxm/projectAcceptanceIdea/createPdfByWindows/${id}`,{},{});
  },
  getIdeaNumBy(id){
    return request.get(`/kjxm/projectAcceptanceIdea/getIdeaNumBy/${id}`);
  },
  getIdeaNumByYear(id){
    return request.get(`/kjxm/projectAcceptanceIdea/getIdeaNumByYear/${id}`);
  }
}
export default acceptance;
